package com.qidian.demo;

import com.qidian.demo.config.RootConfig;
import com.qidian.demo.config.WebConfig;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * @author 戴着假发的程序员
 */
public class DemoContextInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    protected Class<?>[] getRootConfigClasses() {
        // 根容器配置类
        return new Class[]{RootConfig.class};
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        // web容器配置类
        return new Class[]{WebConfig.class};
    }

    @Override
    protected String[] getServletMappings() {
        // 拦截的路径
        return new String[]{"/*","*.action"};
    }
}
